package com.company.cloud.club.modules.config;

import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.profile.DefaultProfile;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

//@Configuration
public class SmsConfig {
    @Value("${aliyun.common.accessKey}")
    private String accessKey;
    @Value("${aliyun.common.accessSecret}")
    private String accessSecret;

    @Bean
    public IAcsClient smsClient() {
        DefaultProfile profile = DefaultProfile.getProfile("cn-shanghai",
                accessKey, accessSecret);
        return new DefaultAcsClient(profile);
    }
}
